﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace XNADota.Graphics.Techniques
{
    public class Technique
    {
        protected Effect _Effect;
        private string _EffectName;

        public Technique(string EffectName)
        {
            _EffectName = EffectName;
            _Effect = XNADota.Instance.Content.Load<Effect>(EffectName);
        }

        public virtual void Begin()
        {
            _Effect.Begin();

            _Effect.CurrentTechnique.Passes[0].Begin();
        }

        public virtual void End()
        {
            _Effect.CurrentTechnique.Passes[0].End();

            _Effect.End();
        }
    }
}
